<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ include file="houtai_mainhead.jsp" %>
	
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="statics/js/jquery-1.12.4.js" charset="UTF-8"></script>
<link rel="stylesheet" href="statics/css/page.css" type="text/css"></link>
<script src="statics/js/usermanage.js"></script>
<script type="text/javascript" src="statics/js/script/jquery.pagination.js" charset="UTF-8"></script>
<script type="text/javascript">
/* $(function() {
	$.post("carbrandmodify",
			function(data) {
		console.log(data.cbId);
			$("#a1").attr("value", data.cbName);
			$("#a2").attr("value",data.cbId);
	})
}); */
$(function(){
	$('.pi').on('click','.file',function(){
		$('.btn').removeAttr('disabled');
		$('.tishi').css('display','none');
	})
	
})
</script>
</head>
<body>
<form action="carmodify?pid=${pid }" method="post" enctype="multipart/form-data">
	<div style="background-color: white;">
	
		<table class="pi">
			<tr>
				<th>名称：</th>
				<td><input type="text"  id="a1" name="cbName" value="${CarBrand.cbName }"></td>
			</tr>

			<tr>
				<th>LOGO：</th>
				<td> <a class="file"  onclick="$('input[id=lefile]').click();">上传文件</a></td>
			</tr>
		</table>
		<input type="hidden" id="a2" name="id" value="${CarBrand.cbId }">
		<input type="text" value="0" style="display: none;" name="panduan" class="tupd">
		<div style="width:300px; margin: 0 auto;">
			<c:if test="${CarBrand.cbLogo==null }">
				<span class="tishi" style="color: red; font-size: 12px;margin-left: 33px;">
					*必须选择图片后才可提交
				</span>
			</c:if>
			<img class="photo"  
				<c:if test="${CarBrand.cbLogo!=null }">
				src="statics/image/upload/logo/${CarBrand.cbLogo }"
				</c:if>
				>
			<br>
			<button class="btn" style="margin-left: 75px;" 
				<c:if test="${CarBrand.cbLogo==null }">
					disabled="disabled"
				</c:if>
			>提交</button>
		</div>
	<input id="lefile"  type="file" onchange="pFile()" name="tx" style="display:none" />
	<input id="photoCover"  type="hidden" >
	</div>
	</form>
</body>
</html>